//package com.movitech.mobile.ddzy.modules.jobs;
//
//import java.util.List;
//
//import org.apache.commons.collections.CollectionUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import com.baomidou.mybatisplus.mapper.EntityWrapper;
//import com.movitech.mobile.cz.base.common.util.CommonConstants;
//import com.movitech.mobile.cz.base.common.util.NumberUtils;
//import com.movitech.mobile.ddzy.bpm.entity.SBpm;
//import com.movitech.mobile.ddzy.bpm.service.SBpmService;
//import com.movitech.mobile.ddzy.modules.bpm.bizservice.MbsBpmCallBackService;
//import com.movitech.mobile.ddzy.modules.bpm.bizvo.FlowAndOperation;
//
//@Component
//public class MBSBpmCallBackJob {
//
//	@Autowired
//    @Qualifier("mbsBpmCallBackService")
//    private MbsBpmCallBackService mbsBpmCallBackService;
//
//	@Autowired
//	@Qualifier("sBpmService")
//	private SBpmService sBpmService;
//
//	@Scheduled(cron = "0 */5 * * * * ")
//	public void synRegionalCompanyAndProjectFromMBSJob() {
//		System.out.println("=============MBSBpmCallBackJob START===============");
//		SBpm sBpm = new SBpm();
//		sBpm.setCurrentBpmFlag(CommonConstants.YES_INTEGER);
//		EntityWrapper<SBpm> wrapper = new EntityWrapper<SBpm>();
//        wrapper.setEntity(sBpm);
//        List<SBpm> lstSBpm = sBpmService.selectList(wrapper);
//        if(CollectionUtils.isNotEmpty(lstSBpm)){
//        	for (SBpm item : lstSBpm) {
//        		FlowAndOperation flowAndOperation = new FlowAndOperation();
//        		flowAndOperation.setFoRelatedTable(item.getBpmRelatedType());
//				flowAndOperation.setFoRelatedId(NumberUtils.toInteger(item.getFormId()));
//				flowAndOperation.setFoStatus("PASS");
//				flowAndOperation.setFoCurrentApproveInfo("通过");
//				mbsBpmCallBackService.mbsBpmCallBack(flowAndOperation);
//			}
//        }
//		System.out.println("=============MBSBpmCallBackJob END===============");
//	}
//
//}
